# 作者：SP
# 开发时间：2023/12/24 20:50
def print_models(unprints_designs,completed_models):
    """模拟打印每个设计，直到没有未打印的设计为止
    打印每个设计后，都将其移到列表complete_models"""
    while unprints_designs:
        current_design = unprints_designs.pop()
        print(f"Printing model:{current_design}")
        completed_models.append(current_design)
def show_completed(completed_models):
    """显示打印好的所有模型"""
    #print("\nThe following models have been printed:")
    for completed_model in completed_models:
        print(completed_model)

unprinted_designs = ['p','g','f']
completed_models = []
#例1
"""此时函数调用的unprinted_designs就为空列表"""
print_models(unprinted_designs,completed_models)
show_completed(completed_models)

#例2
"""此时函数调用的unprinted_designs就为原列表"""
print_models(unprinted_designs[:],completed_models)
"""拷贝列表的副本，输出unprinted_desigens就不会被函数改变 """
show_completed(completed_models)
